.class final Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;
.super Landroid/view/View;
.source "TextViewMultilineEllipse.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;
    }
.end annotation


# static fields
.field private static final LOG:Lcom/burstly/lib/util/LoggerExt;


# instance fields
.field private mAscent:I

.field private mBreakerCollapsed:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

.field private mBreakerExpanded:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

.field private mColorEllipsizeMore:I

.field private mDrawEllipsizeMoreString:Z

.field private mExpanded:Z

.field private mMaxLines:I

.field private mRightAlignEllipsizeMoreString:Z

.field private mStrEllipsis:Ljava/lang/String;

.field private mStrEllipsisMore:Ljava/lang/String;

.field private mText:Ljava/lang/String;

.field private mTextPaint:Landroid/text/TextPaint;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 50
    invoke-static {}, Lcom/burstly/lib/util/LoggerExt;->getInstance()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->LOG:Lcom/burstly/lib/util/LoggerExt;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 146
    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 147
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 3
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v1, 0x1

    const/4 v0, 0x0

    .line 119
    invoke-direct {p0, p1, p2}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 121
    iput-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mExpanded:Z

    .line 122
    iput-boolean v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mDrawEllipsizeMoreString:Z

    .line 123
    iput-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mRightAlignEllipsizeMoreString:Z

    .line 124
    const/4 v0, 0x2

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mMaxLines:I

    .line 125
    const-string v0, "..."

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mStrEllipsis:Ljava/lang/String;

    .line 126
    const-string v0, ""

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mStrEllipsisMore:Ljava/lang/String;

    .line 127
    const v0, -0xffff01

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mColorEllipsizeMore:I

    .line 129
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    invoke-direct {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;-><init>()V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mBreakerExpanded:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    .line 130
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    invoke-direct {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;-><init>()V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mBreakerCollapsed:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    .line 133
    new-instance v0, Landroid/text/TextPaint;

    invoke-direct {v0}, Landroid/text/TextPaint;-><init>()V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    .line 134
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setAntiAlias(Z)V

    .line 135
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    const/high16 v1, 0x4170

    invoke-static {p1}, Lcom/burstly/lib/util/Utils;->getScale(Landroid/content/Context;)F

    move-result v2

    mul-float/2addr v1, v2

    invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setTextSize(F)V

    .line 136
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    const/4 v1, -0x1

    invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setColor(I)V

    .line 137
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    sget-object v1, Landroid/graphics/Paint$Align;->LEFT:Landroid/graphics/Paint$Align;

    invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 138
    return-void
.end method

.method private breakWidth(I)I
    .locals 8
    .parameter "availableWidth"

    .prologue
    .line 401
    const/4 v7, 0x0

    .line 402
    .local v7, widthUsed:I
    iget-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mExpanded:Z

    if-eqz v0, :cond_0

    .line 403
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mBreakerExpanded:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mText:Ljava/lang/String;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingLeft()I

    move-result v2

    sub-int v2, p1, v2

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingRight()I

    move-result v3

    sub-int/2addr v2, v3

    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;->breakText(Ljava/lang/String;ILandroid/text/TextPaint;)I

    move-result v7

    .line 410
    :goto_0
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingLeft()I

    move-result v0

    add-int/2addr v0, v7

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingRight()I

    move-result v1

    add-int/2addr v0, v1

    return v0

    .line 406
    :cond_0
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mBreakerCollapsed:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mText:Ljava/lang/String;

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mStrEllipsis:Ljava/lang/String;

    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mStrEllipsisMore:Ljava/lang/String;

    iget v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mMaxLines:I

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingLeft()I

    move-result v5

    sub-int v5, p1, v5

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingRight()I

    move-result v6

    sub-int/2addr v5, v6

    iget-object v6, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual/range {v0 .. v6}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;->breakText(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILandroid/text/TextPaint;)I

    move-result v7

    goto :goto_0
.end method

.method private measureHeight(I)I
    .locals 6
    .parameter "measureSpec"

    .prologue
    .line 282
    const/4 v1, 0x0

    .line 283
    .local v1, result:I
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v2

    .line 284
    .local v2, specMode:I
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v3

    .line 286
    .local v3, specSize:I
    iget-object v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {v4}, Landroid/text/TextPaint;->ascent()F

    move-result v4

    float-to-int v4, v4

    iput v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mAscent:I

    .line 287
    const/high16 v4, 0x4000

    if-ne v2, v4, :cond_1

    .line 289
    move v1, v3

    .line 306
    :cond_0
    :goto_0
    return v1

    .line 294
    :cond_1
    iget-boolean v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mExpanded:Z

    if-eqz v4, :cond_2

    .line 295
    iget-object v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mBreakerExpanded:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    invoke-virtual {v4}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;->getLines()Ljava/util/List;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v0

    .line 299
    .local v0, numLines:I
    :goto_1
    iget v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mAscent:I

    neg-int v4, v4

    int-to-float v4, v4

    iget-object v5, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {v5}, Landroid/text/TextPaint;->descent()F

    move-result v5

    add-float/2addr v4, v5

    float-to-int v4, v4

    mul-int/2addr v4, v0

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingTop()I

    move-result v5

    add-int/2addr v4, v5

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingBottom()I

    move-result v5

    add-int v1, v4, v5

    .line 302
    const/high16 v4, -0x8000

    if-ne v2, v4, :cond_0

    .line 303
    invoke-static {v1, v3}, Ljava/lang/Math;->min(II)I

    move-result v1

    goto :goto_0

    .line 297
    .end local v0           #numLines:I
    :cond_2
    iget-object v4, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mBreakerCollapsed:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    invoke-virtual {v4}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;->getLines()Ljava/util/List;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v0

    .restart local v0       #numLines:I
    goto :goto_1
.end method

.method private measureWidth(I)I
    .locals 4
    .parameter "measureSpec"

    .prologue
    .line 249
    const/4 v0, 0x0

    .line 250
    .local v0, result:I
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v1

    .line 251
    .local v1, specMode:I
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v2

    .line 253
    .local v2, specSize:I
    const/high16 v3, 0x4000

    if-ne v1, v3, :cond_0

    .line 255
    move v0, v2

    .line 258
    invoke-direct {p0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->breakWidth(I)I

    .line 272
    :goto_0
    return v0

    .line 260
    :cond_0
    const/high16 v3, -0x8000

    if-ne v1, v3, :cond_1

    .line 263
    invoke-direct {p0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->breakWidth(I)I

    move-result v0

    .line 264
    invoke-static {v0, v2}, Ljava/lang/Math;->min(II)I

    move-result v0

    goto :goto_0

    .line 268
    :cond_1
    invoke-direct {p0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->breakWidth(I)I

    goto :goto_0
.end method


# virtual methods
.method public collapse()V
    .locals 1

    .prologue
    .line 389
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mExpanded:Z

    .line 390
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->requestLayout()V

    .line 391
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->invalidate()V

    .line 392
    return-void
.end method

.method public expand()V
    .locals 1

    .prologue
    .line 380
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mExpanded:Z

    .line 381
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->requestLayout()V

    .line 382
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->invalidate()V

    .line 383
    return-void
.end method

.method public isExpanded()Z
    .locals 1

    .prologue
    .line 373
    iget-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mExpanded:Z

    return v0
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 14
    .parameter "canvas"

    .prologue
    const/4 v13, 0x0

    .line 317
    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    .line 321
    iget-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mExpanded:Z

    if-eqz v0, :cond_2

    .line 322
    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mBreakerExpanded:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    .line 323
    .local v7, breaker:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mBreakerExpanded:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;->getLines()Ljava/util/List;

    move-result-object v11

    .line 329
    .local v11, lines:Ljava/util/List;,"Ljava/util/List<[I>;"
    :goto_0
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingLeft()I

    move-result v0

    int-to-float v4, v0

    .line 330
    .local v4, x:F
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingTop()I

    move-result v0

    iget v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mAscent:I

    neg-int v1, v1

    add-int/2addr v0, v1

    int-to-float v5, v0

    .line 333
    .local v5, y:F
    const/4 v9, 0x0

    .local v9, i:I
    :goto_1
    :try_start_0
    invoke-interface {v11}, Ljava/util/List;->size()I

    move-result v0

    if-ge v9, v0, :cond_1

    .line 335
    invoke-interface {v11, v9}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v12

    check-cast v12, [I

    .line 336
    .local v12, pair:[I
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mText:Ljava/lang/String;

    const/4 v0, 0x0

    aget v2, v12, v0

    const/4 v0, 0x1

    aget v0, v12, v0

    add-int/lit8 v3, v0, 0x1

    iget-object v6, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    move-object v0, p1

    invoke-virtual/range {v0 .. v6}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;IIFFLandroid/graphics/Paint;)V

    .line 339
    invoke-interface {v11}, Ljava/util/List;->size()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    if-ne v9, v0, :cond_0

    invoke-virtual {v7}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;->isRequiredEllipsis()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 340
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mStrEllipsis:Ljava/lang/String;

    invoke-virtual {v7}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;->getLengthLastEllipsizedLine()F

    move-result v1

    add-float/2addr v1, v4

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {p1, v0, v1, v5, v2}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 341
    iget-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mDrawEllipsizeMoreString:Z

    if-eqz v0, :cond_0

    .line 342
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {v0}, Landroid/text/TextPaint;->getColor()I

    move-result v10

    .line 343
    .local v10, lastColor:I
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    iget v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mColorEllipsizeMore:I

    invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setColor(I)V

    .line 344
    iget-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mRightAlignEllipsizeMoreString:Z

    if-eqz v0, :cond_3

    .line 346
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mStrEllipsisMore:Ljava/lang/String;

    invoke-virtual {p1}, Landroid/graphics/Canvas;->getWidth()I

    move-result v1

    int-to-float v1, v1

    invoke-virtual {v7}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;->getLengthEllipsisMore()F

    move-result v2

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingRight()I

    move-result v3

    int-to-float v3, v3

    add-float/2addr v2, v3

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->getPaddingLeft()I

    move-result v3

    int-to-float v3, v3

    add-float/2addr v2, v3

    sub-float/2addr v1, v2

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {p1, v0, v1, v5, v2}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 353
    :goto_2
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {v0, v10}, Landroid/text/TextPaint;->setColor(I)V

    .line 356
    .end local v10           #lastColor:I
    :cond_0
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mAscent:I

    neg-int v0, v0

    int-to-float v0, v0

    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {v1}, Landroid/text/TextPaint;->descent()F

    move-result v1

    add-float/2addr v0, v1

    add-float/2addr v5, v0

    .line 357
    invoke-virtual {p1}, Landroid/graphics/Canvas;->getHeight()I
    :try_end_0
    .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    int-to-float v0, v0

    cmpl-float v0, v5, v0

    if-lez v0, :cond_4

    .line 365
    .end local v12           #pair:[I
    :cond_1
    :goto_3
    return-void

    .line 325
    .end local v4           #x:F
    .end local v5           #y:F
    .end local v7           #breaker:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;
    .end local v9           #i:I
    .end local v11           #lines:Ljava/util/List;,"Ljava/util/List<[I>;"
    :cond_2
    iget-object v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mBreakerCollapsed:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    .line 326
    .restart local v7       #breaker:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mBreakerCollapsed:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;->getLines()Ljava/util/List;

    move-result-object v11

    .restart local v11       #lines:Ljava/util/List;,"Ljava/util/List<[I>;"
    goto/16 :goto_0

    .line 350
    .restart local v4       #x:F
    .restart local v5       #y:F
    .restart local v9       #i:I
    .restart local v10       #lastColor:I
    .restart local v12       #pair:[I
    :cond_3
    :try_start_1
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mStrEllipsisMore:Ljava/lang/String;

    invoke-virtual {v7}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse$LineBreaker;->getLengthLastEllipsizedLinePlusEllipsis()F

    move-result v1

    add-float/2addr v1, v4

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {p1, v0, v1, v5, v2}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
    :try_end_1
    .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_2

    .line 362
    .end local v10           #lastColor:I
    .end local v12           #pair:[I
    :catch_0
    move-exception v8

    .line 363
    .local v8, ex:Ljava/lang/IndexOutOfBoundsException;
    sget-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v1, "TextViewMultilineEllipse"

    invoke-virtual {v8}, Ljava/lang/IndexOutOfBoundsException;->getMessage()Ljava/lang/String;

    move-result-object v2

    new-array v3, v13, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logError(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    goto :goto_3

    .line 333
    .end local v8           #ex:Ljava/lang/IndexOutOfBoundsException;
    .restart local v12       #pair:[I
    :cond_4
    add-int/lit8 v9, v9, 0x1

    goto/16 :goto_1
.end method

.method protected onMeasure(II)V
    .locals 2
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"

    .prologue
    .line 239
    invoke-direct {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->measureWidth(I)I

    move-result v0

    invoke-direct {p0, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->measureHeight(I)I

    move-result v1

    invoke-virtual {p0, v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->setMeasuredDimension(II)V

    .line 240
    return-void
.end method

.method public setColorEllpsizeMore(I)V
    .locals 0
    .parameter "color"

    .prologue
    .line 224
    iput p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mColorEllipsizeMore:I

    .line 225
    return-void
.end method

.method public setDrawEllipsizeMoreString(Z)V
    .locals 0
    .parameter "drawEllipsizeMoreString"

    .prologue
    .line 215
    iput-boolean p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mDrawEllipsizeMoreString:Z

    .line 216
    return-void
.end method

.method public setEllipsis(Ljava/lang/String;)V
    .locals 0
    .parameter "ellipsis"

    .prologue
    .line 188
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mStrEllipsis:Ljava/lang/String;

    .line 189
    return-void
.end method

.method public setEllipsisMore(Ljava/lang/String;)V
    .locals 0
    .parameter "ellipsisMore"

    .prologue
    .line 197
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mStrEllipsisMore:Ljava/lang/String;

    .line 198
    return-void
.end method

.method public setMaxLines(I)V
    .locals 0
    .parameter "maxLines"

    .prologue
    .line 206
    iput p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mMaxLines:I

    .line 207
    return-void
.end method

.method public setRightAlignEllipsizeMoreString(Z)V
    .locals 0
    .parameter "rightAlignEllipsizeMoreString"

    .prologue
    .line 234
    iput-boolean p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mRightAlignEllipsizeMoreString:Z

    .line 235
    return-void
.end method

.method public setText(Ljava/lang/String;)V
    .locals 0
    .parameter "text"

    .prologue
    .line 155
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mText:Ljava/lang/String;

    .line 156
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->requestLayout()V

    .line 157
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->invalidate()V

    .line 158
    return-void
.end method

.method public setTextColor(I)V
    .locals 1
    .parameter "color"

    .prologue
    .line 177
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    invoke-virtual {v0, p1}, Landroid/text/TextPaint;->setColor(I)V

    .line 178
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->invalidate()V

    .line 179
    return-void
.end method

.method public setTextSize(I)V
    .locals 2
    .parameter "size"

    .prologue
    .line 166
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->mTextPaint:Landroid/text/TextPaint;

    int-to-float v1, p1

    invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setTextSize(F)V

    .line 167
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->requestLayout()V

    .line 168
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->invalidate()V

    .line 169
    return-void
.end method
